﻿@model Parichay.Domain.MemberReplies
  @{
      Parichay.AppConstants.ReturnContollerHomes rUrl = Parichay.AppConstants.ReturnContollerHomes.Post;
      bool flat = Enum.TryParse<Parichay.AppConstants.ReturnContollerHomes>(Url.RequestContext.RouteData.Values["controller"].ToString(), out rUrl);
}
         <div class="box">
         <div class="cmtBox"> <div class="cmt">
         <span class="name"><a href="#" class="openModal" data-name="child@(Model.Id)_s@(Model.Sender.Id)">@Model.Sender.Givennm</a></span><span class="location">:</span><span class="name">@((Model.Recipient.Id == 0) ? "Self" : Model.Recipient.Givennm.ToString())</span><span class="dt">@Model.CreatedAgo</span>
        <span class="cmtText">
         @if (Model.Type == 2)
         { 
                    <a href='@(Model.Targeturl)'>
                        <img src='@(Model.Thumbnailfilename)' /></a>
         }
         else
         {
                    @(Model.Text)
                    
         }
        </span><span class="replybtn">
       
        </span>  </div> 
         <div class="cmtopt">
          
                     @if (Context.User.Identity.IsAuthenticated)
                     {
                        <div><a href='@Url.Action("Reply", "Post", new { id = Model.Parent.Id, rId = Model.Sender.Id, rUrl = (int)rUrl })' >Reply</a></div>
                     } 
                @if (((Parichay.Domain.Models.CustomIdentity)Context.User.Identity).UserKey == Model.Sender.Id)
                {
                <div><a href='@Url.Action("DelReply", "Post", new { id = Model.Id, rUrl = (int)rUrl })' >Delete</a></div>
                    
                }
         </div>
         </div>
         </div>
         <div id='child@(Model.Id)_s@(Model.Sender.Id)' class="modalWin">@Html.Partial("BO/UsrProf", Model.Sender)</div>  